package io;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo3 {
    public static void main(String[] args) throws Exception{
        FileOutputStream fos = new FileOutputStream("demo.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        PrintWriter pw = new PrintWriter(osw);
        pw.println("馕言文");
        pw.println("诶 鹏友");
        pw.close();

    }
}
